const withNextIntl = require("next-intl/plugin")("./lib/i18n.ts")

/** @type {import('next').NextConfig} */
const nextConfig = {
    compiler: {
        styledComponents: true
    },
    webpack(config) {
        config.module.rules.push({
            test: /\.(graphql|gql)$/,
            exclude: /node_modules/,
            use: [
                {
                    loader: 'graphql-tag/loader',
                },
            ],
        });

        return config;
    }
}

module.exports = withNextIntl(nextConfig)
